<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'MyJsp.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
    This is my JSP page. <br>
    <form action="${pageContext.request.contextPath}/springmvc/testMethod" method="post">
    	<input type="submit" value="post提交" />
    </form>
    <form action="${pageContext.request.contextPath}/springmvc/testParamsAndHeaders">
    	<input name="username" value="brozer" type="hidden" />
    	<input name="age" value="11" type="hidden"/>
    	<input type="submit" value="带参提交"/>
    </form>
    <a href="${pageContext.request.contextPath}/springmvc/testPathVariable/1">url占位符(id)</a>
    
    <!-- --------使用Restful风格 --><br>
    <a href="${pageContext.request.contextPath}/springmvc/testRest/1">获取id为1</a>
    <form action="${pageContext.request.contextPath}/springmvc/testRest" method="post">
    	<input type="hidden" name="_method" value="POST"/>
    	<input type="submit" value="Restful提交数据"/>
    </form>
    <form action="${pageContext.request.contextPath}/springmvc/testRest/1" method="post">
    	<input name="_method" value="PUT" type="hidden" />
    	<input type="submit" value="Restful更新数据" />
    </form>
    <form action="${pageContext.request.contextPath}/springmvc/testRest/1" method="post">
    	<input name="_method" value="DELETE" type="hidden" />
    	<input type="submit" value="Restful删除数据" />
    </form>
    
    <a href="${pageContext.request.contextPath}/springmvc/testRequestParam?id=123">testRequestParam</a>
    <a href="${pageContext.request.contextPath}/springmvc/testRequestHeader">testRequestHeader</a><br/>
    <a href="${pageContext.request.contextPath}/springmvc/testCookieValue">testCookieValue</a>
    
    <!-- -----测试POJO --><br/>
    <form action="${pageContext.request.contextPath}/springmvc/testPOJO" method="post">
    	username:<input type="text" name="username" /><br/>
    	password:<input type="password" name="password"/><br/>
    	email:<input type="text" name="email"/><br/>
    	age:<input type="text" name="age" /><br/>
   		city:<input type="text" name="address.city"/>
   		province:<input type="text" name="address.province"/>
    	<input type="submit" value="Submit"/>
 
    </form>
    <br/>
    <a href="${pageContext.request.contextPath}/springmvc/testServletAPI">testServletAPI</a><br/></body>
    <a href="${pageContext.request.contextPath}/springmvc/testModelAndView">testModelAndView</a>
    <a href="${pageContext.request.contextPath}/springmvc/valid">testValid</a>
    <a href="${pageContext.request.contextPath}/springmvc/testMap">testMap</a>
    <a href="${pageContext.request.contextPath}/springmvc/testSessionAttributes">testSessionAttributes</a><br/>
    <a href="${pageContext.request.contextPath}/springmvc/testModelAttribute?id=1">testModelAttribute</a><br/>
    
    <-- -----使用ModelAttribute修改POJO------ --><br/>
    <form action="${pageContext.request.contextPath}/springmvc/testModelAttribute?id=1" method="post">
    	username:<input type="text" name="username" /><br/>
    	password:<input type="password" name="password"/><br/>
    	email:<input type="text" name="email"/><br/>
    	age:<input type="text" name="age" /><br/>
   		city:<input type="text" name="address.city"/>
   		province:<input type="text" name="address.province"/>
    	<input type="submit" value="Submit"/>
 
    </form>
    <br/>
    <a href="${pageContext.request.contextPath}/springmvc/testView">testView</a><br/>
    <a href="${pageContext.request.contextPath}/springmvc/testRedireact">testRedirect</a><br/>
    
    
    	<a href="i18n">I18N PAGE</a>
    	